﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ORMAC.Attributes;

namespace ORMAC.UnitTest
{
    [Table("Invoice")]
    public class Invoice
    {
        [PrimaryKey]
        [Field("InvoiceID")]
        public int InvoiceID { get; set; }
        [Field("Description")]
        public string Description { get; set; }
        [Join(ParentCol="BilledTo",ChildCol="PersonID")]
        public Person BilledTo { get; set; }
        [Join(ParentCol = "InvoiceID", ChildCol = "InvoiceID")]
        public List<Item> Items { get; set; }
        [LinkTable(LinkTableName="Invoice2GLAccount", ParentCol = "InvoiceID", LinkTableParentCol = "LInvoiceID", LinkTableChildCol = "LGLAccountID", ChildCol = "GLAccountID")]
        public List<GLAccount> GLAcounts { get; set; }
    }
}
